@(customer: Customer, roadmap: Roadmap, measures: List[(Measure, RoadmapMeasure)], discounts: List[RoadmapDiscount], editPlanForm: Form[RoadmapPlan], allMeasures: List[Measure], tipDetails: List[(Tip, Customer)], tipComments: List[(TipComment, Customer)], tipLikes: Map[Long, List[Long]])(implicit flash: Flash)
@**
    To include request in the page from slick db session you can add the following to the header above:
    (implicit rs: play.api.db.slick.DBSessionRequest[_])

    to use it: @rs.request.uri- @rs.request.domain

    To include request from normal play request action you include the play request object
    (implicit request: play.api.mvc..Request)
**@

@socialMediaMessage(context: String = play.Play.application().path().getAbsolutePath()) = {
    
    @context
}

@main(Some(customer)) {
  
  @customerBanner(customer)


  @**
  @if(!flash.isEmpty){
    <div class="alert-message info">
      @flash.get("success")
    </div> 
  }
  **@

  @plan(roadmap, measures, discounts, editPlanForm, allMeasures)


  @tips(customer, tipDetails, tipComments, tipLikes)  

  <div id="socialMediaPnl" class="well well-sm pull-right">
    <a id="fb-social-link" class="btn btn-default btn-sm" target="_blank" title="On Facebook" href="">
        <i class="fa fa-facebook fa-lg fb"></i>
    </a>
    <a id="twitter-social-link" class="btn btn-default btn-sm" target="_blank" title="On Twitter" href="">
        <i class="fa fa-twitter fa-lg tw"></i>
    </a>
    <a id="plusone-social-link" class="btn btn-default btn-sm" target="_blank" title="On Google Plus" href="">
        <i class="fa fa-google-plus fa-lg google"></i>
    </a>
    <a id="pinterest-social-link" class="btn btn-default btn-sm" target="_blank" title="Pin It" href="">
        <i class="fa fa-pinterest fa-lg pinterest"></i>
    </a>
  </div>
}


<script type="text/javascript" charset="utf-8">
  $(function() {
    $('[data-toggle=tooltip]').tooltip(); 
    
    $("#fb-social-link").attr('href','http://www.facebook.com/sharer.php?u=' + getRoadmapUrl());
    $("#twitter-social-link").attr('href','http://twitter.com/share?url=' + getRoadmapUrl());
    $("#plusone-social-link").attr('href','https://plusone.google.com/_/+1/confirm?hl=en&amp;url=' + getRoadmapUrl());
    $("#pinterest-social-link").attr('href','http://www.pinterest.com/pin/create/button/?url=' + getRoadmapUrl());
  });

  function getRoadmapUrl() {
    return $(location).attr('href');
  }
    
</script> 

